﻿/* ----------------------------------------------------------------------------
 * Copyright (c) Philip Stears 
 *
 * This source code is subject to terms and conditions of the Microsoft Public 
 * License (Ms-PL).
 * 
 * By using this source code in any fashion, you are agreeing to be bound 
 * by the terms of the Microsoft Public License.
 * 
 * To request a copy of the Microsoft Public License, send a request by email
 * to license@connectbasic.net.
 *
 * This notice must not be removed from this software.
 * ---------------------------------------------------------------------------- */

namespace ConnectBasic.Shell.Extensibility
{
    using System;

    /// <summary>
    /// Provides a contract used to describe the code in a code buffer.
    /// </summary>
    public interface ICodeSnapshot : IServiceProvider
    {

        /// <summary>
        /// Gets the complete contents of the code buffer.
        /// </summary>
        /// <returns></returns>
        string GetBufferContents();

        /// <summary>
        /// Called by consumers to provide services related to the updated buffer contents.
        /// </summary>
        /// <param name="provider">The service provider.</param>
        void AttachServices(IServiceProvider provider);
    }
}
